//
//  UILabel+Category.h
//  YLB
//
//  Created by Zoo Chow on 17/02/2017.
//  Copyright © 2017 Zoo. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UILabel (Category)
/**
 *  create label
 *
 *  @param frame label frame
 *  @param tag   label tag
 *  @param text  label text
 *  @param color label text color
 *  @param font  label text font
 *
 *  @return label
 */
+ (UILabel*)createLabel:(CGRect)frame tag:(NSInteger)tag text:(NSString*)text color:(UIColor*)color font:(UIFont*)font;
/**
 *  create label
 *
 *  @param frame            label frame
 *  @param tag              label tag
 *  @param attributedString label attributedString
 *
 *  @return label
 */
+ (UILabel*)createLabel:(CGRect)frame tag:(NSInteger)tag attributedString:(NSAttributedString*)attributedString;
/**
 *  get label show size
 *
 *  @param baseSize base size
 *  @param font in font
 *  @param text show texts
 *
 *  @return size
 */
+ (CGSize)getLabelSizeToFitInBaseSize:(CGSize)baseSize inFont:(UIFont*)font withText:(NSString*)text;
+ (CGSize)getLabelSizeToFitInBaseSize:(CGSize)baseSize inFont:(UIFont*)font withText:(NSString*)text textAlignment:(NSTextAlignment)alignment;
- (CGSize)getSizeToFitInBase;
/**
 *  insert pic into text
 */
- (void)setTextWithSource:(NSArray*)sources;

@end
